package com.yunfei.bo;


import com.yunfei.entity.TPersonalUserChildEntity;
import com.yunfei.utils.string.StringUtil;

/**
 * 子女基本信息
 * tPersonalUserChild 实体类
 *@author zhengyunfei
 *@createDate Tue Apr 17 13:56:26 CST 2018
 */


public class TPersonalUserChildBo implements java.io.Serializable{
 private String userId;
 private String ages;
 private String sexs;
 private String remark;
 private String field;
 private String order;
/**
     * 更改排序字段
     * @return
     */
public String getField() {
        return field;
}
public void setField(String field) {
        this.field = field;
}
public String getOrder() {
        return order;
}
public void setOrder(String order) {
        this.order = order;
}
 private int curNo;
 public int getCurNo() {
     int value=(curNo-1)*curSize;
     return value;
 }
 public void setCurNo(int curNo) {
     this.curNo = curNo;
 }
 private int curSize;
 public int getCurSize() {
     return curSize;
 }
 public void setCurSize(int curSize) {
     this.curSize = curSize;
 }
 public void setUserId(String userId){
     this.userId=userId;
 }
 public String getUserId(){
     return userId;
 }

    public String getAges() {
        return ages;
    }

    public void setAges(String ages) {
        this.ages = ages;
    }

    public String getSexs() {
        return sexs;
    }

    public void setSexs(String sexs) {
        this.sexs = sexs;
    }

    public void setRemark(String remark){
     this.remark=remark;
 }
 public String getRemark(){
     return remark;
 }
 public static TPersonalUserChildEntity boToEntity(TPersonalUserChildBo bo){
     TPersonalUserChildEntity entity=new TPersonalUserChildEntity();
     entity.setUserId(bo.getUserId());
     entity.setAge(bo.getAges());
     entity.setSex(bo.getSexs());
     entity.setRemark(bo.getRemark());
     return entity;
 }
 public static TPersonalUserChildBo entityToBo(TPersonalUserChildEntity bo){
     TPersonalUserChildBo entity=new TPersonalUserChildBo();
     entity.setUserId(bo.getUserId());
     entity.setAges(bo.getAge());
     entity.setSexs(bo.getSex());
     entity.setRemark(bo.getRemark());
     return entity;
 }
 public static String changeFieldColumn(String field){
     String result="";
         if(!StringUtil.isNullOrEmpty(field)){
             if(field.equals("id")){
                 result="ID";
             }
             if(field.equals("userId")){
                 result="USER_ID";
             }
             if(field.equals("age")){
                 result="AGE";
             }
             if(field.equals("sex")){
                 result="SEX";
             }
             if(field.equals("remark")){
                 result="REMARK";
             }
             if(field.equals("createDate")){
                 result="CREATE_DATE";
             }
             if(field.equals("updateDate")){
                 result="UPDATE_DATE";
             }
     }
     return result;
 }
}

